package demo05

/**
 * @author xiaoZhao
 * @date 2022/6/30
 * @describe
 */
object Test04_ClassForAcess {
  def main(args: Array[String]): Unit = {

  }
}

// 定义一个父类
class Person {
  private var idCard: String = "323121233"
  // 只能子当前类和子类中可以访问到
  protected var name: String = "lisi"
  var sex: String = "男"
  private[demo05] var age: Int = 17

  def printInfo()={
    println(s"Person: ${idCard} $name $sex $age")
  }
}
